package cn.crce.cloud9.simple;

/**
 * @author OnCloud9
 * @description
 * @project NRCE-TEST
 * @date 2022年09月10日 上午 11:20
 */
public class Case41 {
    public static void main(String[] args) throws Exception{

        for(int i=0;i<5;i++){
            Thread t = new MyThread();
            t.start();
        }
        Thread.sleep(1000);
        R r = new R();
        //**************found*****************
        for(int i=0;i< 5;i++){
            Thread t = new Thread(r);
            //**************found*****************
            t.start();
        }
    }
}


//**************found*****************
class MyThread extends Thread{
    public int x = 0;

    public void run(){
        //**************found*****************
        System.out.println(x + 1);
    }
}

//**************found*****************
class R implements Runnable{
    private int x = 0;
    //**************found*****************
    public void run(){
        System.out.println(++x);
    }
}
